<?php
namespace web\admin\controller;
class Webset extends Common{
	public function index(){
		if (IS_POST){
			$webSetModel = new \system\model\Webset();
			//p($_POST);循环数组
			foreach ($_POST as $k=>$v){
				$webSetModel->where('name',$k)->update(['value'=>$v]);
			}
			message('操作成功',u('index'),'success');
		}
		$data = Db::table('webset')->get();
		//p($data);
		View::with('data',$data);
		View::make();
	}
}
